//
//  SportDetailCollectionViewCell.m
//  MansApp
//
//  Created by lanou3g on 15/7/15.
//  Copyright (c) 2015年 ACH. All rights reserved.
//

#import "SportDetailCollectionViewCell.h"

@implementation SportDetailCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        
        
        self.headView = [[SportPieceView alloc]initWithFrame:CGRectMake(0, 0, kWidth, 100)];
        self.headView.backgroundColor =[UIColor colorWithRed:arc4random()%256 / 255.0 green:arc4random()%64 / 255.0 blue:arc4random()%64 / 255.0 alpha:0.7];
        self.headView.titleLabel.font = [UIFont fontWithName:@"CourierNewPS-BoldMT" size:kP6Height(18)];
        self.headView.titleLabel.numberOfLines = 0;
        self.headView.titleLabel.textColor = [UIColor whiteColor];
        self.headView.autherLabel.textColor = [UIColor whiteColor];
        self.webView = [[UIWebView alloc]initWithFrame:CGRectMake(0,kP6Height(100), kWidth, kHeight - kP6Height(140))];
        
         UIImageView *imageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, kHeight - kP6Height(40), kWidth,kP6Height(40))];
        imageView.image = [UIImage imageNamed:@"article_special_title_bg"];
        self.button = [UIButton buttonWithType:UIButtonTypeSystem];
        self.button.frame = CGRectMake(0, 0, kP6Height(40),kP6Height(40));
        self.button.center = imageView.center;
        [self.button setBackgroundImage:[UIImage imageNamed:@"weibo_backBlack@2x"] forState:UIControlStateNormal];
        
        
        [self.contentView addSubview:self.headView];
        [self.contentView addSubview:self.webView];
        [self.contentView addSubview:imageView];
        [self.contentView addSubview:self.button];
        
        
    }
    
    
    return self;
}





@end
